<template>
  <div>
    <GraphComponent :graph-data="graphData" />
  </div>
</template>
<script>
import GraphComponent from "./Graph.vue";
export default {
  name: "IndexComponent",
  components: { GraphComponent },
  data() {
    return {
      graphData: {
        // 默认的节点数据
        shape: "top", // 指定使用何种图形，默认值为 'rect'
        id: "node1",
        x: this.graphMiddleWidth,
        y: 0,
        width: 100,
        height: 40,
        label: "第一级节点", // String，节点标签
        editForm: {
          xm: "第一级节点",
          zz: "总部机关",
          zj: "副总师级别",
          zw: "主任",
          gw: "||||||||",
          cj: 1,
        },
        children: [],
      },
    };
  },
};
</script>
